www.gusucode.com > 星梦奇缘交友网 1 > 星梦奇缘交友网 1.0源码程序/love/leaveword/admin_appendfilter.asp

    <!-- #include file="config.asp" -->
<!-- #include file="style.asp" -->
<!-- #include file="admin_verify.asp" -->



<%

Response.Expires=-1

tfindexp=Request.Form("findexp")
if tfindexp<>"" then
	tfiltermode=0

	arr_findrange=split(Request.Form("findrange"),",")
	for fi=0 to ubound(arr_findrange)
		if len(arr_findrange(fi))<=5 then
			if isnumeric(arr_findrange(fi)) then
				if cint(arr_findrange(fi))<16384 then
					tfiltermode=tfiltermode+cint(arr_findrange(fi))
				end if
			end if
		end if
	next

	if Request.Form("matchcase")="8192" then tfiltermode=tfiltermode+8192
	if Request.Form("filtermethod")="16384" then
		tfiltermode=tfiltermode+16384
	elseif Request.Form("filtermethod")="4096" then
		tfiltermode=tfiltermode+4096
	end if
	
	if Request.Form("filtermethod")="0" then
		treplacestr=Request.Form("replacetxt")
	else
		treplacestr=""
	end if

	set cn=server.CreateObject("ADODB.Connection")
	set rs=server.CreateObject("ADODB.Recordset")
	CreateConn cn,dbtype

	cn.BeginTrans
	
	rs.Open "filterconfig",cn,0,3
	rs.AddNew
	rs("regexp")=tfindexp
	rs("filtermode")=tfiltermode
	rs("replacestr")=treplacestr
	rs.Update
	rs.Close 

	rs.Open "SELECT MAX(filterid) FROM filterconfig",cn,0,1
	pfilterid=rs(0)
	rs.Close
	
	rs.Open "UPDATE filterconfig SET filtersort=" &pfilterid& " WHERE filterid=" &pfilterid,cn,0,1
		
	cn.CommitTrans
	
	cn.Close
	set rs=nothing
	set cn=nothing
end if

Response.Redirect "admin_filter.asp"
%>